<%= content_for :css do %>
	<%= stylesheet_link_tag '/assets/all_structures'%>
	<style>
		#mainContent{height: <%= 110 + ((@structures.count/3.0).ceil * 175) %>px;}
	</style>
<% end %>

<div id="orinfo"> <%= link_to 'Home', root_path %> > All Structures </div>

<h1>All Structures</h1>

<ul class="selectType">
	Select the typology:
	<li>
		<button>
		<%= link_to 'All', structures_all_path %>
		</button>
	</li>
	<% @typologies.each do |t| %>
		<li>
			<button>
			<%= link_to t.capitalize, structures_all_path(typology: t) %>
			</button>
		</li>
	<% end %>
</ul>

<ul class="results">
	<% @structures.each do |structure| %>
		<li>
			<%= link_to structure_path(structure) do %>
				<%= image_tag structure.preview_img_src %>
				<br><br>				
				<%= structure.name %>
			<% end %>
		</li>
	<% end %>
</ul>
